package helper.com.utils;

import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author 大忽悠
 * @create 2022/5/22 21:02
 */
@Component
@Service
@RequiredArgsConstructor
public class RabbitmqUtil {
    private final RabbitTemplate rabbitTemplate;

    public void send(String exchangeName,String routeKey,Object msg){
        rabbitTemplate.convertAndSend(exchangeName,routeKey,msg);
    }
}
